﻿namespace Dyao.Book.Web.Extensions
{
    public class AdditionDataFormatterContractResolverOptions
    {
        //public const string DefaultDefaultNameFormat = "{0}_desc";

        /// <summary>
        /// bool类型序列化时是否添加描述,默认为true
        /// </summary>
        public bool IsAddBoolDescription { get; set; } = true;

        /// <summary>
        /// bool类型添加的描述名称格式化字符串
        /// </summary>
        public string BoolDescriptionNameFormat { get; set; }

        /// <summary>
        /// enum 类型序列化时是否添加描述,默认为true
        /// </summary>
        public bool IsAddEnumDescription { get; set; } = true;

        /// <summary>
        /// enum 类型添加的描述名称格式化字符串
        /// </summary>
        public string EnumDescriptionNameFormat { get; set; }

        /// <summary>
        /// string 类型序列化遇到null时是否转成空字符串,默认为false
        /// </summary>
        public bool IsConvertStringToEmpty { get; set; } = false;

        /// <summary>
        /// 数组或List 序列化时遇到null 是否转成空实例,默认为false
        /// </summary>
        public bool IsConvetListToEmpty { get; set; } = false;


    }
}
